package com.hhe.datax_transfer.utils;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class test {
    private static Runtime runtime = Runtime.getRuntime();

    public static void main(String[] args) throws InterruptedException {
        int kb = 1024;
        long totalMemory = Runtime.getRuntime().totalMemory() / kb / kb;
        long freeMemory = Runtime.getRuntime().freeMemory() / kb / kb;
        long maxMemory = Runtime.getRuntime().maxMemory() / kb / kb;
        log.info(totalMemory + "mb");
        log.info(freeMemory + "mb");
        log.info(maxMemory + "mb");
//        for (int i = 0; i < 2; i++) {
//            new Thread(() -> {
//                while (true) {
//                    long bac = 1000000;
//                    bac = bac >> 1;
//                }
//            }).start();
//            ;
//        }
//        while (true) {
//            Thread.sleep(5000);
//            System.out.println(CPUMonitorCalc.getInstance().getProcessCpu());
//        }
    }
}
